<?php

namespace App\Http\Controllers;

use App\Http\Service\UserService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;

class UserController extends BaseController
{
    private $getRules=[
            'type'=> 'required',
            //'city_code'=>'required',
        ];
    private  $getRulesMessage=[
            'type.required'=> 'type不能为空',
           // 'city_code.required'=> 'city_code不能为空',

        ];
    public $repository;
    public function __construct(UserService $repository)
    {
        parent::__construct();
        $this->repository = $repository;
    }

    //判断是否是官方账号并且返回账号信息
    public function isUserOfficial(Request $request)
    {

        $data=[
            'userId'=>$request->json("people_id"),
        ];
        if(empty($data['userId'])){
            $this->error("用户id不能为空");

        }

        $this->success($this->repository->isUserOfficial($request,$data));
    }

  

}
